<!--
 * @Author: wuwle
 * @Date: 2020-10-30 11:36:11
 * @LastEditors: wuwle
 * @LastEditTime: 2021-07-16 16:29:15
 * @FilePath: \demo\复习\css\案例\perseve-3d\01_3d翻转.html
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* 实现：
        1.文字在上面，翻转180隐藏
        2.底部背景图
        3.hover时再翻转过来 */
      .item {
        /* perspective: 500px; */
        transform-style: preserve-3d;
      }
      .backFace {
        width: 200px;
        height: 200px;
        background-color: pink;
        transform: rotateY(180deg);
        backface-visibility: hidden;
        position: absolute;
        top: 0;
        left: 0;
        transition: transform 4s;
      }
      .face {
        width: 200px;
        height: 200px;
        background: url('./binoli.png') center center no-repeat;

        background-color: skyblue;
        transition: transform 4s;
      }
      .item:hover .backFace {
        transform: rotateY(360deg);
      }
      .item:hover .face {
        transform: rotateY(180deg);
      }
    </style>
  </head>
  <body>
    <div class="item">
      <div class="backFace">文字嘻嘻嘻喜爱</div>
      <div class="face"></div>
    </div>
  </body>
</html>
